home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / tls / tls583.ltr < prev    next >
Text File  |  1995-07-05  |  5KB  |  99 lines

  1.                                    sockinfo
  2.  
  3. sockinfo lets the system administrator or programmer obtain more information
  4. on TCP, UDP, ICMP, RAW, and IGMP protocol control blocks (PCB) in a format 
  5. similar to netstat(TC).  sockinfo identifies and shows:
  6.  
  7. - the process, file descriptor in the process, user, and tty device 
  8.   (if present) associated with the PCB.
  9. - all TCP options (SO_KEEPALIVE, SO_LINGER, etc.) set on the connection.
  10. - TCP external state information like ESTABLISHED or SYN_SENT as well as
  11.   internal state like ISCONNECTED and CANTRCVMORE.
  12. - TCP timers in effect.  You can watch retransmissions, keepalive timers, and
  13.   other timers expire.
  14. - TCP internal parameters (sequence numbers, window sizes, etc.).
  15. - where the last UDP packet was sent to and how long ago that was.
  16. - the route and interface the PCB is currently using.
  17. - when route was added to routing table and how it was added.
  18. - any process sending ICMP packets.
  19. - any process sending RAW packets.
  20. - any process sending IGMP packets (OpenServer 5 only)
  21. - lines pertaining to netbios.
  22. - lines pertaining to in-kernel NFS (these are guesses on ODT3.0 but 
  23.   accurate on OpenServer 5).
  24. - the upstream driver (socket for BSD socket programs, timod for TLI programs, 
  25.   ktmod for NFS, or netbios)
  26.  
  27. sockinfo can also limit its output to one particular process or PCB and
  28. display the information at fixed intervals for further analysis.
  29.  
  30. sockinfo has been compiled for SCO UNIX 3.2.4.2/TCP1.2.1 (ODT3.0, OSES3.0)
  31. as well as OpenServer release 5.
  32.  
  33. sockinfo requires read access on /unix and /dev/kmem in order to obtain the
  34. above information.
  35.  
  36. Installing sockinfo:
  37. --------------------
  38. sockinfo can be copied into and run from any directory.  Copy sockinfo to 
  39. an appropriate directory (such as /bin or /opt/SCO/TLS/) and type:
  40.  
  41. # chgrp mem sockinfo
  42. # chmod 2511 sockinfo
  43.  
  44. This allows any user to run sockinfo without being root.  If you make sockinfo
  45. setuid root users will not be able to use the -h or -n options; these are
  46. reserved for user root.  Note that sockinfo does not need to be setuid root
  47. to work and making sockinfo setgid mem as described above is preferred.
  48.  
  49. Running sockinfo:
  50. -----------------
  51. type sockinfo without any arguments to see a usage line.  
  52.  
  53. Interpreting sockinfo output:
  54. -----------------------------
  55. While sockinfo mimics netstat as much as possible, some fields with some
  56. options may be unfamiliar to the user.  When in doubt, grep for the field
  57. name in /usr/include/sys, /usr/include/sys/net, or /usr/include/sys/netinet.
  58. Sockinfo shows fields values literally:  some information such as
  59. dates or aging information may not be correct until data has actually been
  60. sent, or a process may not exist for all PCB's, etc.
  61.  
  62. Caveat for -h option on OpenServer 5:
  63. ---------------------------------------
  64. As root, if you use the -h "hurry" option on OpenServer 5.0 you will obtain more
  65. accurate information if you are concerned with timers or are trying to monitor
  66. a process which is rapidly manipulating/creating connections.  To do this, 
  67. sockinfo will have substantially higher priority than other user processes as 
  68. shown with ps -efl; this will degrade the performance of other runnable 
  69. processes on the machine.  This effect is worse when using the -l "loop" option
  70. since sockinfo will only stop running for the number of "interval" seconds you 
  71. specify.  In fact, with -h -l 0, sockinfo will completely "hog" the CPU and 
  72. prevent nearly all other user processes from running!
  73. To lessen this effect, set the environment variable SOCKINFO_PRIORITY 
  74. to an integer number between 1 and 127 before running sockinfo. 
  75. The value 1 means sockinfo will have a low priority while 127 means that 
  76. sockinfo will have an extremely high priority as far as the scheduler is 
  77. concerned.  You will see the new process priority with ps -efl.
  78.  
  79. OpenServer 5 note:
  80. --------------------
  81. If a dynamic kernel table size grows while sockinfo is running you may see 
  82. strange behaviour.  restart sockinfo and the problem will disappear.  
  83. I intend to add dynamic table support in a future release.
  84.  
  85. The format used to display TCP control block information will be cleaned up 
  86. in a future release.
  87.  
  88. For performance reasons, sockinfo will not work if kernel auditing is active.
  89.  
  90. This code is provided as an unsupported supplement to the SCO TCP/IP
  91. operating system component, under the same terms as specified in the SCO
  92. end user license.
  93.  
  94. I am interested in feedback(good and bad!) as well as any bugs you find.
  95.  
  96. Nathan Peterson
  97. nathan@sco.com
  98. 30 June 1995
  99.